.class public Lcom/glympse/android/glympse/ViewUserBar;
.super Landroid/widget/LinearLayout;
.source "ViewUserBar.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/glympse/android/glympse/ViewUserBar$OnClickCenter;,
        Lcom/glympse/android/glympse/ViewUserBar$OnClickLeft;,
        Lcom/glympse/android/glympse/ViewUserBar$OnClickRight;,
        Lcom/glympse/android/glympse/ViewUserBar$SetAvatarSizeDelayed;
    }
.end annotation


# instance fields
.field public m_fltDownX:F

.field public m_fltThreshold:F

.field private m_nSetAvatarSizeDelayedCount:I

.field public m_oImageLeft:Landroid/widget/ImageView;

.field public m_oImageRight:Landroid/widget/ImageView;

.field public m_oImageUser:Landroid/widget/ImageView;

.field public m_oTextStatus1:Landroid/widget/TextView;

.field public m_oTextStatus2:Landroid/widget/TextView;

.field public m_oTextUser:Landroid/widget/TextView;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 6
    .parameter "oContext"

    .prologue
    const/4 v5, 0x0

    const/4 v4, 0x0

    .line 46
    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 33
    iput-object v4, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageLeft:Landroid/widget/ImageView;

    .line 34
    iput-object v4, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageRight:Landroid/widget/ImageView;

    .line 35
    iput-object v4, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageUser:Landroid/widget/ImageView;

    .line 36
    iput-object v4, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextUser:Landroid/widget/TextView;

    .line 37
    iput-object v4, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextStatus1:Landroid/widget/TextView;

    .line 38
    iput-object v4, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextStatus2:Landroid/widget/TextView;

    .line 39
    const/high16 v1, 0x7fc0

    iput v1, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_fltDownX:F

    .line 40
    const/high16 v1, 0x4170

    invoke-virtual {p0}, Lcom/glympse/android/glympse/ViewUserBar;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v2

    iget v2, v2, Landroid/util/DisplayMetrics;->density:F

    mul-float/2addr v1, v2

    iput v1, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_fltThreshold:F

    .line 41
    iput v5, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_nSetAvatarSizeDelayedCount:I

    .line 48
    invoke-virtual {p0}, Lcom/glympse/android/glympse/ViewUserBar;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-static {v1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v1

    const v2, 0x7f030025

    const/4 v3, 0x1

    invoke-virtual {v1, v2, p0, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v0

    .line 50
    .local v0, oView:Landroid/view/View;
    const v1, 0x7f0c007e

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageLeft:Landroid/widget/ImageView;

    .line 51
    const v1, 0x7f0c0082

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageRight:Landroid/widget/ImageView;

    .line 52
    const v1, 0x7f0c007f

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageUser:Landroid/widget/ImageView;

    .line 53
    const v1, 0x7f0c001d

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextUser:Landroid/widget/TextView;

    .line 54
    const v1, 0x7f0c0080

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextStatus1:Landroid/widget/TextView;

    .line 55
    const v1, 0x7f0c0081

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextStatus2:Landroid/widget/TextView;

    .line 57
    new-instance v1, Lcom/glympse/android/glympse/ViewUserBar$OnClickCenter;

    invoke-direct {v1, v4}, Lcom/glympse/android/glympse/ViewUserBar$OnClickCenter;-><init>(Lcom/glympse/android/glympse/ViewUserBar$OnClickCenter;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 58
    iget-object v1, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageLeft:Landroid/widget/ImageView;

    new-instance v2, Lcom/glympse/android/glympse/ViewUserBar$OnClickLeft;

    invoke-direct {v2, v4}, Lcom/glympse/android/glympse/ViewUserBar$OnClickLeft;-><init>(Lcom/glympse/android/glympse/ViewUserBar$OnClickLeft;)V

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 59
    iget-object v1, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageRight:Landroid/widget/ImageView;

    new-instance v2, Lcom/glympse/android/glympse/ViewUserBar$OnClickRight;

    invoke-direct {v2, v4}, Lcom/glympse/android/glympse/ViewUserBar$OnClickRight;-><init>(Lcom/glympse/android/glympse/ViewUserBar$OnClickRight;)V

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 61
    invoke-direct {p0, v5}, Lcom/glympse/android/glympse/ViewUserBar;->SetAvatarSize(Z)V

    .line 62
    return-void
.end method

.method private SetAvatarSize(Z)V
    .locals 6
    .parameter "fDoDelayedIfFail"

    .prologue
    const/4 v3, 0x0

    .line 67
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageUser:Landroid/widget/ImageView;

    invoke-virtual {v2, v3, v3}, Landroid/widget/ImageView;->measure(II)V

    .line 68
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageUser:Landroid/widget/ImageView;

    invoke-virtual {v2}, Landroid/widget/ImageView;->getHeight()I

    move-result v0

    .line 70
    .local v0, nHeight:I
    if-lez v0, :cond_1

    .line 72
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageUser:Landroid/widget/ImageView;

    invoke-virtual {v2}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v1

    .line 73
    .local v1, oLayoutParams:Landroid/view/ViewGroup$LayoutParams;
    iput v0, v1, Landroid/view/ViewGroup$LayoutParams;->width:I

    .line 74
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageUser:Landroid/widget/ImageView;

    invoke-virtual {v2, v1}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 75
    iput v3, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_nSetAvatarSizeDelayedCount:I

    .line 83
    .end local v1           #oLayoutParams:Landroid/view/ViewGroup$LayoutParams;
    :cond_0
    :goto_0
    return-void

    .line 77
    :cond_1
    if-eqz p1, :cond_0

    iget v2, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_nSetAvatarSizeDelayedCount:I

    const/16 v3, 0xa

    if-ge v2, v3, :cond_0

    .line 79
    iget v2, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_nSetAvatarSizeDelayedCount:I

    add-int/lit8 v2, v2, 0x1

    iput v2, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_nSetAvatarSizeDelayedCount:I

    .line 80
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "SetAvatarSizeDelayed:"

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget v3, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_nSetAvatarSizeDelayedCount:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ", "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    sget-object v3, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-virtual {v3}, Lcom/glympse/android/glympse/Glympse;->GetCurrentEView()Lcom/glympse/android/glympse/Glympse$EViews;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 81
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v2

    new-instance v3, Lcom/glympse/android/glympse/ViewUserBar$SetAvatarSizeDelayed;

    const/4 v4, 0x0

    invoke-direct {v3, p0, v4}, Lcom/glympse/android/glympse/ViewUserBar$SetAvatarSizeDelayed;-><init>(Lcom/glympse/android/glympse/ViewUserBar;Lcom/glympse/android/glympse/ViewUserBar$SetAvatarSizeDelayed;)V

    const-wide/16 v4, 0x64

    invoke-virtual {v2, v3, v4, v5}, Lcom/glympse/platform/Platform;->PostToMainThreadDelayed(Lcom/glympse/platform/GRunnable;J)Z

    goto :goto_0
.end method

.method static synthetic access$0(Lcom/glympse/android/glympse/ViewUserBar;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 65
    invoke-direct {p0, p1}, Lcom/glympse/android/glympse/ViewUserBar;->SetAvatarSize(Z)V

    return-void
.end method


# virtual methods
.method public DoUpdate(Lcom/glympse/android/glympse/Glympse$EViews;)V
    .locals 17
    .parameter "eView"

    .prologue
    .line 149
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v11

    iget-object v11, v11, Lcom/glympse/platform/Platform;->m_oUserList:Lcom/glympse/platform/common/UserList;

    iget-object v10, v11, Lcom/glympse/platform/common/UserList;->m_oActiveUser:Lcom/glympse/platform/common/User;

    .line 151
    .local v10, oUser:Lcom/glympse/platform/common/User;
    iget-object v11, v10, Lcom/glympse/platform/common/User;->m_oImageAvatar:Lcom/glympse/platform/GImage;

    if-eqz v11, :cond_2

    iget-object v11, v10, Lcom/glympse/platform/common/User;->m_oImageAvatar:Lcom/glympse/platform/GImage;

    iget-object v11, v11, Lcom/glympse/platform/GImage;->m_oDrawable:Landroid/graphics/drawable/BitmapDrawable;

    if-eqz v11, :cond_2

    .line 153
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageUser:Landroid/widget/ImageView;

    move-object v11, v0

    iget-object v12, v10, Lcom/glympse/platform/common/User;->m_oImageAvatar:Lcom/glympse/platform/GImage;

    iget-object v12, v12, Lcom/glympse/platform/GImage;->m_oDrawable:Landroid/graphics/drawable/BitmapDrawable;

    invoke-virtual {v11, v12}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 160
    :goto_0
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageLeft:Landroid/widget/ImageView;

    move-object v11, v0

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v12

    iget-object v12, v12, Lcom/glympse/platform/Platform;->m_oUserList:Lcom/glympse/platform/common/UserList;

    iget-object v12, v12, Lcom/glympse/platform/common/UserList;->m_listUsers:Lcom/glympse/platform/GVector$Users;

    invoke-virtual {v12}, Lcom/glympse/platform/GVector$Users;->firstElement()Ljava/lang/Object;

    move-result-object v12

    if-ne v12, v10, :cond_3

    .line 161
    const v12, 0x7f02000c

    .line 160
    :goto_1
    invoke-virtual {v11, v12}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 163
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageRight:Landroid/widget/ImageView;

    move-object v11, v0

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v12

    iget-object v12, v12, Lcom/glympse/platform/Platform;->m_oUserList:Lcom/glympse/platform/common/UserList;

    iget-object v12, v12, Lcom/glympse/platform/common/UserList;->m_listUsers:Lcom/glympse/platform/GVector$Users;

    invoke-virtual {v12}, Lcom/glympse/platform/GVector$Users;->lastElement()Ljava/lang/Object;

    move-result-object v12

    if-ne v12, v10, :cond_4

    .line 164
    const v12, 0x7f02000c

    .line 163
    :goto_2
    invoke-virtual {v11, v12}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 166
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextUser:Landroid/widget/TextView;

    move-object v11, v0

    iget-object v12, v10, Lcom/glympse/platform/common/User;->m_strVisibleDisplayName:Ljava/lang/String;

    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 171
    sget-object v11, Lcom/glympse/android/glympse/Glympse$EViews;->Map:Lcom/glympse/android/glympse/Glympse$EViews;

    move-object v0, v11

    move-object/from16 v1, p1

    if-ne v0, v1, :cond_a

    .line 173
    invoke-virtual {v10}, Lcom/glympse/platform/common/User;->GetLocPoint()Lcom/glympse/platform/common/LocPoint;

    move-result-object v7

    .line 174
    .local v7, oLocPoint:Lcom/glympse/platform/common/LocPoint;
    invoke-virtual {v7}, Lcom/glympse/platform/common/LocPoint;->HasLocation()Z

    move-result v11

    if-eqz v11, :cond_8

    .line 176
    invoke-virtual {v10}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v11

    if-eqz v11, :cond_6

    .line 178
    invoke-virtual {v7}, Lcom/glympse/platform/common/LocPoint;->HasSpeed()Z

    move-result v11

    if-eqz v11, :cond_5

    .line 180
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextStatus1:Landroid/widget/TextView;

    move-object v11, v0

    iget v12, v7, Lcom/glympse/platform/common/LocPoint;->m_fltSpeedMetersPerSecond:F

    const/4 v13, 0x1

    invoke-static {v12, v13}, Lcom/glympse/platform/common/Helpers;->SpeedToStr(FZ)Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 216
    .end local v7           #oLocPoint:Lcom/glympse/platform/common/LocPoint;
    :goto_3
    invoke-static {}, Lcom/glympse/platform/common/CorrectedTime;->GetTime()J

    move-result-wide v2

    .line 218
    .local v2, lCurrent:J
    invoke-virtual {v10}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v11

    if-eqz v11, :cond_f

    .line 221
    const/4 v6, 0x0

    .local v6, nWatching:I
    const/4 v4, 0x0

    .local v4, nHaveWatched:I
    const/4 v5, 0x0

    .line 222
    .local v5, nRecipients:I
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v11

    iget-object v11, v11, Lcom/glympse/platform/Platform;->m_oSentTickets:Lcom/glympse/platform/common/SentTicketList;

    iget-object v11, v11, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v11}, Lcom/glympse/platform/GVector$Tickets;->iterator()Ljava/util/Iterator;

    move-result-object v11

    :cond_0
    invoke-interface {v11}, Ljava/util/Iterator;->hasNext()Z

    move-result v12

    if-nez v12, :cond_b

    .line 250
    :cond_1
    if-lez v5, :cond_e

    .line 252
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextStatus2:Landroid/widget/TextView;

    move-object v11, v0

    new-instance v12, Ljava/lang/StringBuilder;

    const-string v13, "Viewers: "

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v12, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v12

    const-string v13, " recent, "

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v12

    const-string v13, " total"

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 268
    .end local v4           #nHaveWatched:I
    .end local v5           #nRecipients:I
    .end local v6           #nWatching:I
    :goto_4
    sget-object v11, Lcom/glympse/android/glympse/Glympse$EViews;->Map:Lcom/glympse/android/glympse/Glympse$EViews;

    move-object v0, v11

    move-object/from16 v1, p1

    if-ne v0, v1, :cond_11

    const/4 v11, 0x1

    :goto_5
    move-object/from16 v0, p0

    move v1, v11

    invoke-direct {v0, v1}, Lcom/glympse/android/glympse/ViewUserBar;->SetAvatarSize(Z)V

    .line 269
    return-void

    .line 157
    .end local v2           #lCurrent:J
    :cond_2
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oImageUser:Landroid/widget/ImageView;

    move-object v11, v0

    const v12, 0x7f0200bc

    invoke-virtual {v11, v12}, Landroid/widget/ImageView;->setImageResource(I)V

    goto/16 :goto_0

    .line 161
    :cond_3
    const v12, 0x7f02000d

    goto/16 :goto_1

    .line 164
    :cond_4
    const v12, 0x7f02000e

    goto/16 :goto_2

    .line 184
    .restart local v7       #oLocPoint:Lcom/glympse/platform/common/LocPoint;
    :cond_5
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextStatus1:Landroid/widget/TextView;

    move-object v11, v0

    const-string v12, " "

    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_3

    .line 189
    :cond_6
    invoke-virtual {v7}, Lcom/glympse/platform/common/LocPoint;->HasSpeed()Z

    move-result v11

    if-eqz v11, :cond_7

    .line 191
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextStatus1:Landroid/widget/TextView;

    move-object v11, v0

    new-instance v12, Ljava/lang/StringBuilder;

    iget v13, v7, Lcom/glympse/platform/common/LocPoint;->m_fltSpeedMetersPerSecond:F

    const/4 v14, 0x1

    invoke-static {v13, v14}, Lcom/glympse/platform/common/Helpers;->SpeedToStr(FZ)Ljava/lang/String;

    move-result-object v13

    invoke-static {v13}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v13

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v13, ", "

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    .line 192
    iget-wide v13, v10, Lcom/glympse/platform/common/User;->m_lElapsed:J

    invoke-static {v13, v14}, Lcom/glympse/platform/common/Helpers;->ElapsedToStr(J)Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v12

    .line 191
    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_3

    .line 196
    :cond_7
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextStatus1:Landroid/widget/TextView;

    move-object v11, v0

    iget-wide v12, v10, Lcom/glympse/platform/common/User;->m_lElapsed:J

    invoke-static {v12, v13}, Lcom/glympse/platform/common/Helpers;->ElapsedToStr(J)Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_3

    .line 202
    :cond_8
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextStatus1:Landroid/widget/TextView;

    move-object v11, v0

    invoke-virtual {v10}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v12

    if-eqz v12, :cond_9

    sget-object v12, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-virtual {v12}, Lcom/glympse/android/glympse/Glympse;->GetLocationText()I

    move-result v12

    :goto_6
    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setText(I)V

    goto/16 :goto_3

    :cond_9
    const v12, 0x7f0a0020

    goto :goto_6

    .line 209
    .end local v7           #oLocPoint:Lcom/glympse/platform/common/LocPoint;
    :cond_a
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextStatus1:Landroid/widget/TextView;

    move-object v11, v0

    iget-object v12, v10, Lcom/glympse/platform/common/User;->m_strActivity:Ljava/lang/String;

    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_3

    .line 222
    .restart local v2       #lCurrent:J
    .restart local v4       #nHaveWatched:I
    .restart local v5       #nRecipients:I
    .restart local v6       #nWatching:I
    :cond_b
    invoke-interface {v11}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Lcom/glympse/platform/common/Ticket;

    .line 225
    .local v9, oTicket:Lcom/glympse/platform/common/Ticket;
    iget-wide v12, v9, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    cmp-long v12, v12, v2

    if-lez v12, :cond_1

    .line 231
    iget-object v12, v9, Lcom/glympse/platform/common/Ticket;->m_listRecipients:Lcom/glympse/platform/GVector$Recipients;

    invoke-virtual {v12}, Lcom/glympse/platform/GVector$Recipients;->iterator()Ljava/util/Iterator;

    move-result-object v12

    :cond_c
    :goto_7
    invoke-interface {v12}, Ljava/util/Iterator;->hasNext()Z

    move-result v13

    if-eqz v13, :cond_0

    invoke-interface {v12}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Lcom/glympse/platform/common/Recipient;

    .line 233
    .local v8, oRecipient:Lcom/glympse/platform/common/Recipient;
    add-int/lit8 v5, v5, 0x1

    .line 236
    iget v13, v8, Lcom/glympse/platform/common/Recipient;->m_nUse:I

    if-lez v13, :cond_c

    .line 238
    add-int/lit8 v4, v4, 0x1

    .line 241
    iget-wide v13, v8, Lcom/glympse/platform/common/Recipient;->m_lLastUseTime:J

    cmp-long v13, v13, v2

    if-gez v13, :cond_d

    .line 242
    iget-wide v13, v8, Lcom/glympse/platform/common/Recipient;->m_lLastUseTime:J

    sub-long v13, v2, v13

    const-wide/32 v15, 0x2bf20

    cmp-long v13, v13, v15

    if-gtz v13, :cond_c

    .line 244
    :cond_d
    add-int/lit8 v6, v6, 0x1

    goto :goto_7

    .line 256
    .end local v8           #oRecipient:Lcom/glympse/platform/common/Recipient;
    .end local v9           #oTicket:Lcom/glympse/platform/common/Ticket;
    :cond_e
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextStatus2:Landroid/widget/TextView;

    move-object v11, v0

    const-string v12, "No active Glympses"

    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_4

    .line 259
    .end local v4           #nHaveWatched:I
    .end local v5           #nRecipients:I
    .end local v6           #nWatching:I
    :cond_f
    iget-object v11, v10, Lcom/glympse/platform/common/User;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v11}, Lcom/glympse/platform/GVector$Tickets;->isEmpty()Z

    move-result v11

    if-nez v11, :cond_10

    iget-object v11, v10, Lcom/glympse/platform/common/User;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    const/4 v12, 0x0

    invoke-virtual {v11, v12}, Lcom/glympse/platform/GVector$Tickets;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/glympse/platform/common/Ticket;

    iget-wide v11, v4, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    cmp-long v11, v11, v2

    if-lez v11, :cond_10

    .line 261
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextStatus2:Landroid/widget/TextView;

    move-object v11, v0

    new-instance v12, Ljava/lang/StringBuilder;

    iget-object v13, v10, Lcom/glympse/platform/common/User;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    const/4 v14, 0x0

    invoke-virtual {v13, v14}, Lcom/glympse/platform/GVector$Tickets;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/glympse/platform/common/Ticket;

    iget-wide v13, v4, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    sub-long/2addr v13, v2

    invoke-static {v13, v14}, Lcom/glympse/platform/common/Helpers;->DurationToStr(J)Ljava/lang/String;

    move-result-object v13

    invoke-static {v13}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v13

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v13, " remaining"

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_4

    .line 265
    :cond_10
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewUserBar;->m_oTextStatus2:Landroid/widget/TextView;

    move-object v11, v0

    const-string v12, "Completed Glympse"

    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_4

    .line 268
    :cond_11
    const/4 v11, 0x0

    goto/16 :goto_5
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 6
    .parameter "oEvent"

    .prologue
    const/4 v5, 0x0

    const/high16 v4, 0x7fc0

    .line 105
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v2

    packed-switch v2, :pswitch_data_0

    .line 143
    :cond_0
    :goto_0
    invoke-super {p0, p1}, Landroid/widget/LinearLayout;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v2

    :goto_1
    return v2

    .line 108
    :pswitch_0
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v2

    iput v2, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_fltDownX:F

    goto :goto_0

    .line 112
    :pswitch_1
    iget v2, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_fltDownX:F

    invoke-static {v2}, Ljava/lang/Float;->isNaN(F)Z

    move-result v2

    if-nez v2, :cond_0

    .line 114
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v0

    .line 115
    .local v0, fltCurX:F
    iget v2, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_fltDownX:F

    iget v3, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_fltThreshold:F

    add-float/2addr v2, v3

    cmpl-float v2, v0, v2

    if-ltz v2, :cond_1

    .line 117
    sget-object v2, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    sget-object v3, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-virtual {v3}, Lcom/glympse/android/glympse/Glympse;->GetCurrentEView()Lcom/glympse/android/glympse/Glympse$EViews;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/glympse/android/glympse/Glympse;->GetIView(Lcom/glympse/android/glympse/Glympse$EViews;)Lcom/glympse/android/glympse/Glympse$IGlympseView;

    move-result-object v1

    .line 118
    .local v1, oView:Lcom/glympse/android/glympse/Glympse$IGlympseView;
    const/16 v2, 0x15

    invoke-interface {v1, v2, v5}, Lcom/glympse/android/glympse/Glympse$IGlympseView;->OnKeyDownForward(ILandroid/view/KeyEvent;)Z

    .line 119
    iput v4, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_fltDownX:F

    goto :goto_0

    .line 121
    .end local v1           #oView:Lcom/glympse/android/glympse/Glympse$IGlympseView;
    :cond_1
    iget v2, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_fltDownX:F

    iget v3, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_fltThreshold:F

    sub-float/2addr v2, v3

    cmpg-float v2, v0, v2

    if-gtz v2, :cond_0

    .line 123
    sget-object v2, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    sget-object v3, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-virtual {v3}, Lcom/glympse/android/glympse/Glympse;->GetCurrentEView()Lcom/glympse/android/glympse/Glympse$EViews;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/glympse/android/glympse/Glympse;->GetIView(Lcom/glympse/android/glympse/Glympse$EViews;)Lcom/glympse/android/glympse/Glympse$IGlympseView;

    move-result-object v1

    .line 124
    .restart local v1       #oView:Lcom/glympse/android/glympse/Glympse$IGlympseView;
    const/16 v2, 0x16

    invoke-interface {v1, v2, v5}, Lcom/glympse/android/glympse/Glympse$IGlympseView;->OnKeyDownForward(ILandroid/view/KeyEvent;)Z

    .line 125
    iput v4, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_fltDownX:F

    goto :goto_0

    .line 131
    .end local v0           #fltCurX:F
    .end local v1           #oView:Lcom/glympse/android/glympse/Glympse$IGlympseView;
    :pswitch_2
    iget v2, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_fltDownX:F

    invoke-static {v2}, Ljava/lang/Float;->isNaN(F)Z

    move-result v2

    if-eqz v2, :cond_2

    .line 133
    const/4 v2, 0x1

    goto :goto_1

    .line 135
    :cond_2
    iput v4, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_fltDownX:F

    goto :goto_0

    .line 139
    :pswitch_3
    iput v4, p0, Lcom/glympse/android/glympse/ViewUserBar;->m_fltDownX:F

    goto :goto_0

    .line 105
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_1
        :pswitch_3
    .end packed-switch
.end method
